@import './variables.less';

// 页面加载进度条
.page-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: @primary-color;
  z-index: 10001;
  box-shadow: 0 0 10px fade(@primary-color, 70%);
  transition: width 0.2s linear;
}

// 页面加载过渡效果
body {
  &.page-loading {
    overflow-x: hidden;
    
    .layout-container {
      opacity: 0.9;
      transition: opacity 0.2s ease;
    }
  }
  
  &.nprogress-busy:after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 9990;
    pointer-events: none;
  }
}

.layout-container {
  opacity: 1;
  transition: opacity 0.3s ease;
}

// 移除并重写NProgress样式
#nprogress {
  display: none !important;
  
  .bar,
  .peg,
  .spinner {
    display: none !important;
  }
  
  .bar,
  .peg {
    z-index: 10000 !important;
  }
}

// 全局加载动画
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid @border-color-base;
    border-top-color: @primary-color;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
} 